import axios from '../request'
export const selectByPage = (page) => axios.get("/api/pub/v2/pa/selectByPage", {

    params: {
        "page": page

    }

})


export const insert = (


    entrustedCaseNumber,
    name,
    contractNumber,
    cardNum,
    sex,
    birthDate,
    homeAddress,
    loanNum,
    litigationPrincipal,
    interestArrears,
    compoundInterestArrears,
    litigationInterest,
    litigationAmount,
    rateMonth,
    rateYear,
    loanPeriod,
    contractDate,
    expiredDate,
    launchedDate,
    lineCredit,
    lastPaidDate,
    calculatedPaidInterest,
    tel,
    loanUse,
    payWay,
    payDay,
    formerNameContract,
    verifiedDocumentAddress,
    deadlineDate,
    startDateInterestAfterJudgment,
    firstOverdueDate,
    paidPrincipal,
    paidInterest,
    paymentWay,
    lawsuitNum,
    courtDate,
    litigationFee,
    halfLitigationFee,
    litigationDate,
    securityFee,
    securityNum,
    executeDate,
    executeNum,
    cardNumDistrict,
    seizeAddress,
    declaredFee,
    lawyerFee,
    executeAmount,
    executeFee,
    executeAll,
    executeJudge,
    fee
) => axios.post("/api/pub/v2/pa/insert", {


    entrustedCaseNumber,
    name,
    contractNumber,
    cardNum,
    sex,
    birthDate,
    homeAddress,
    loanNum,
    litigationPrincipal,
    interestArrears,
    compoundInterestArrears,
    litigationInterest,
    litigationAmount,
    rateMonth,
    rateYear,
    loanPeriod,
    contractDate,
    expiredDate,
    launchedDate,
    lineCredit,
    lastPaidDate,
    calculatedPaidInterest,
    tel,
    loanUse,
    payWay,
    payDay,
    formerNameContract,
    verifiedDocumentAddress,
    deadlineDate,
    startDateInterestAfterJudgment,
    firstOverdueDate,
    paidPrincipal,
    paidInterest,
    paymentWay,
    lawsuitNum,
    courtDate,
    litigationFee,
    halfLitigationFee,
    litigationDate,
    securityFee,
    securityNum,
    executeDate,
    executeNum,
    cardNumDistrict,
    seizeAddress,
    declaredFee,
    lawyerFee,
    executeAmount,
    executeFee,
    executeAll,
    executeJudge,
    fee

})

export const deleteById = (id) => axios.get("/api/pub/v2/pa/deleteById", {
    params: {
        "id": id
    }

})

export const update = (

    id,
    entrustedCaseNumber,
    name,
    contractNumber,
    cardNum,
    sex,
    birthDate,
    homeAddress,
    loanNum,
    litigationPrincipal,
    interestArrears,
    compoundInterestArrears,
    litigationInterest,
    litigationAmount,
    rateMonth,
    rateYear,
    loanPeriod,
    contractDate,
    expiredDate,
    launchedDate,
    lineCredit,
    lastPaidDate,
    calculatedPaidInterest,
    tel,
    loanUse,
    payWay,
    payDay,
    formerNameContract,
    verifiedDocumentAddress,
    deadlineDate,
    startDateInterestAfterJudgment,
    firstOverdueDate,
    paidPrincipal,
    paidInterest,
    paymentWay,
    lawsuitNum,
    courtDate,
    litigationFee,
    halfLitigationFee,
    litigationDate,
    securityFee,
    securityNum,
    executeDate,
    executeNum,
    cardNumDistrict,
    seizeAddress,
    declaredFee,
    lawyerFee,
    executeAmount,
    executeFee,
    executeAll,
    executeJudge,
    fee
) => axios.post("/api/pub/v2/pa/update", {

    id,
    entrustedCaseNumber,
    name,
    contractNumber,
    cardNum,
    sex,
    birthDate,
    homeAddress,
    loanNum,
    litigationPrincipal,
    interestArrears,
    compoundInterestArrears,
    litigationInterest,
    litigationAmount,
    rateMonth,
    rateYear,
    loanPeriod,
    contractDate,
    expiredDate,
    launchedDate,
    lineCredit,
    lastPaidDate,
    calculatedPaidInterest,
    tel,
    loanUse,
    payWay,
    payDay,
    formerNameContract,
    verifiedDocumentAddress,
    deadlineDate,
    startDateInterestAfterJudgment,
    firstOverdueDate,
    paidPrincipal,
    paidInterest,
    paymentWay,
    lawsuitNum,
    courtDate,
    litigationFee,
    halfLitigationFee,
    litigationDate,
    securityFee,
    securityNum,
    executeDate,
    executeNum,
    cardNumDistrict,
    seizeAddress,
    declaredFee,
    lawyerFee,
    executeAmount,
    executeFee,
    executeAll,
    executeJudge,
    fee



})

export const selectByNameOrKey = (key, page) => axios.get("/api/pub/v2/pa/selectByNameOrKey", {
    params: {
        "key": key,
        "page": page

    }

})